Skip to main content

Reply To Comment

POST /post/comment/:commentId/reply

Description

Creates a reply to an existing comment. Internally this uses the same comment creation flow as post comments, but attaches the new comment to a parent comment.

Request Parameters

Requires Authentication: true

PATH PARAMS

NameTypeRequiredDescription
commentIdstringYesParent comment ID.

BODY

NameTypeRequiredDescription
commentstringYesReply text.
gifstringNoGiphy GIF ID.

Success Response

{
"message": "Comment created successfully",
"post": {
"_id": "66cbbea31e854f3d7995c1f0"
},
"comment": {
"_id": "66ef265c8f073b81cb3b3901",
"parentCommentId": "66ef265c8f073b81cb3b3900"
}
}

Error Response

CodeDescription
400Comment missing
401Invalid comment ID
404Comment or post not found
413Comment too long
500Server error